package com.situ.mall.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author JavaWizard
 * @since 2024-04-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("comment")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 所属帖子id
     */
    private Integer postId;

    /**
     * 详细内容
     */
    private String details;

    /**
     * 发布该评论的用户id
     */
    private Integer memberId;

    /**
     * 该条评论所回复的评论的用户id
     */
    private Integer replayMemberId;

    /**
     * 评论级别：1级评论；2级评论；3级评论
     */
    private String replay;

    /**
     * 回复的评论的id，只有当replay为2或3时才有值
     */
    private Integer replayId;

    /**
     * 3级评论所归属的2级评论的id，2级评论看replay_id，3级评论看father_id
     */
    private Integer fatherId;

    /**
     * 发布时间
     */
    private LocalDateTime createTime;

}
